#ifndef _CONTACTPERSON_H_
#define _CONTACTPERSON_H_

#include "telephoneBook.h"

struct contactPerson;

typedef struct contactPerson Cper;

Cper *createCper(char *name, char *phone);

void *Create(char *name, char *phone);

void freeCp(elementType ptr);

void printCper(elementType ptr);

bool isNameEqual(elementType ptr1, elementType ptr2);

bool isPhoneEqual(elementType ptr1, elementType ptr2);

bool isNameContaining(elementType ptr1, elementType ptr2);

bool isPhoneContaining(elementType ptr1, elementType ptr2);

bool sortByName(void *ptr1, void *ptr2);

bool sortByPhone(void *ptr1, void *ptr2);

int serachByName(void *ptr1, void *ptr2);

int serachByPhone(void *ptr1, void *ptr2);

//修改人联系人名字和电话
void modifyContact(TBook *a, elementType findElement, elementType modifyElementName, elementType modifyElementPhone);

char *GetInfo(void *ptr);

#endif